<?php
/**
 * Intreface DAO
 *
 * @author: Dragan Milchevski
 * @date: 2012-06-23 13:23
 */
interface DocumentDAO{

	/**
	 * Get Domain object by primry key
	 *
	 * @param String $id primary key
	 * @Return Library 
	 */
	public function load($id);

	/**
	 * Get all records from table
	 */
	public function queryAll();
	
	/**
	 * Get all records from table ordered by field
	 * @Param $orderColumn column name
	 */
	public function queryAllOrderBy($orderColumn);
	
	/**
 	 * Delete record from table
 	 * @param library primary key
 	 */
	public function delete($id);
	
	/**
 	 * Insert record to table
 	 *
 	 * @param Library library
 	 */
	public function insert($library);
	
	/**
 	 * Update record in table
 	 *
 	 * @param Library library
 	 */
	public function update($library);	

	/**
	 * Delete all rows
	 */
	public function clean();

	public function queryByFile($value);

	public function queryByAuthors($value);

	public function queryByAffiliation($value);

	public function queryByTitle($value);

	public function queryByJournal($value);

	public function queryBySecondaryTitle($value);

	public function queryByYear($value);

	public function queryByVolume($value);

	public function queryByIssue($value);

	public function queryByPages($value);

	public function queryByAbstract($value);

	public function queryByKeywords($value);

	public function queryByEditor($value);

	public function queryByPublisher($value);

	public function queryByPlacePublished($value);

	public function queryByReferenceType($value);

	public function queryByUid($value);

	public function queryByDoi($value);

	public function queryByUrl($value);

	public function queryByAdditionDate($value);

	public function queryByRating($value);

	public function queryByAuthorsAscii($value);

	public function queryByTitleAscii($value);

	public function queryByAbstractAscii($value);

	public function queryByAddedBy($value);

	public function queryByModifiedBy($value);

	public function queryByModifiedDate($value);

	public function queryByCustom1($value);

	public function queryByCustom2($value);

	public function queryByCustom3($value);

	public function queryByCustom4($value);
	
	public function queryByCategory($value);


	public function deleteByFile($value);

	public function deleteByAuthors($value);

	public function deleteByAffiliation($value);

	public function deleteByTitle($value);

	public function deleteByJournal($value);

	public function deleteBySecondaryTitle($value);

	public function deleteByYear($value);

	public function deleteByVolume($value);

	public function deleteByIssue($value);

	public function deleteByPages($value);

	public function deleteByAbstract($value);

	public function deleteByKeywords($value);

	public function deleteByEditor($value);

	public function deleteByPublisher($value);

	public function deleteByPlacePublished($value);

	public function deleteByReferenceType($value);


	/**
	 * This method is used in the Advance Search section
	 * the array $parameters contain key-value pairs, where the
	 * keys represents the attribute of the document (Library).
	 * @param array $parameters
	 * @return array
	 * @author Lisette
	 */
	public function query($parameters);
	
	/**
	 *
	 */
	public function getlastFilename($id);

	public function queryByTitleRestrictLength ($value);
	
	public function queryAllJournalsOrdered();
	
	public function queryAllSecTitleOrdered();
	
	public function insertShelf($document_id,$user_id);
	
	public function getNewFileName();
	
	public function insertFullText($id,$full_text);
	
	public function deleteFullText($id);
	
	


}
?>